package server.business.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName blood_discard_apply
 * @author Galaxy
 */
@TableName(value ="blood_discard_apply")
@Data
public class BloodDiscardApply implements Serializable {
    /**
     * 报废申请编号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "gmt_create", fill = FieldFill.INSERT) // 创建注解
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "gmt_modified", fill = FieldFill.INSERT_UPDATE) // 更新注解
    private Date gmtModified;


    /**
     * 申请编号
     */
    @TableField(value = "apply_id")
    private String applyId;


    /**
     * 产品码/血装编号条码
     */
    @TableField(value = "barcode")
    private Long barcode;

    /**
     * 血液id
     */
    @TableField(value = "blood_id")
    private String bloodId;

    /**
     * 血液成分/血液名称
     */
    @TableField(value = "blood_component")
    private String bloodComponent;

    /**
     * RH血型
     */
    @TableField(value = "rh_blood_type")
    private String rhBloodType;

    /**
     * ABO血型
     */
    @TableField(value = "abo_blood_type")
    private String aboBloodType;

    /**
     * 规格/血量
     */
    @TableField(value = "blood_count")
    private Long bloodCount;

    /**
     * 计量单位
     */
    @TableField(value = "measurement_unit")
    private Integer measurementUnit;

    /**
     * 血液来源
     */
    @TableField(value = "blood_source")
    private String bloodSource;

    /**
     * 血液金额
     */
    @TableField(value = "blood_amount")
    private Long bloodAmount;

    /**
     * 报废原因
     */
    @TableField(value = "scrap_reason")
    private String scrapReason;

    /**
     * 逻辑删除
     */
    @TableField(value = "is_deleted")
    @TableLogic
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = -2277682913046844790L;
}